Skip to content

Comments

Rewrite pyannote-cloud crate with progenitor#4160

Merged
yujonglee merged 2 commits intomainfrom
devin/1771770490-pyannote-cloud-progenitor
Feb 22, 2026
Merged

Rewrite pyannote-cloud crate with progenitor#4160
yujonglee merged 2 commits intomainfrom
devin/1771770490-pyannote-cloud-progenitor

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Feb 22, 2026

Rewrite pyannote-cloud crate with progenitor

Summary

Replaces the hand-written pyannote API client with a progenitor-generated client from the official OpenAPI spec, following the same pattern as the chatwoot crate:

  • fetch.sh — downloads the raw OpenAPI spec to openapi.gen.json
  • build.rs — uses progenitor-utils to filter, normalize, and generate Rust client code at build time
  • openapi-filtered.gen.json — the processed/filtered spec committed for reference
  • src/lib.rs — single include! of the generated code

Removes the manual PyannoteClient, PyannoteClientBuilder, and hand-written modules (get_job.rs, submit_diarization_job.rs, test_key.rs).

The generated client now covers all pyannote API endpoints: diarize, voiceprint, identify, get job, list jobs, test, and media upload/download.

Review & Testing Checklist for Human

  • Breaking downstream consumers: The old crate's public API (PyannoteClient::builder(), get_job::Request/Response, submit_diarization_job::Request/Response, etc.) is fully removed. Verify nothing outside this crate depends on those types — grep found no .rs imports, but check Tauri command bindings or any code that may reference specta::Type renames like DiarizationSubmitRequest, DiarizationRetrieveResponse.
  • Lost specta::Type derives: The old types derived specta::Type for TypeScript binding generation. Progenitor-generated types won't have these. Confirm this doesn't break any frontend type generation pipeline.
  • Verify generated client API is usable: Build the crate (cargo build -p pyannote-cloud) and inspect the generated types/methods in target/debug/build/pyannote-cloud-*/out/codegen.rs. Ensure the progenitor client's constructor and method signatures work for your use case (e.g., Bearer auth setup).
  • regress crate added as new dependency: Required by progenitor-generated pattern validation code (for GetMediaUploadUrl.url and Voiceprint.label patterns). Verify this is acceptable.

Notes

  • The ALLOWED_PATH_PREFIXES in build.rs is set to ["/v1/"] which retains all endpoints. This is intentional since the entire pyannote API lives under /v1/.
  • All old #[ignore] integration tests were removed. No new tests were added.
  • Link to Devin run
  • Requested by @yujonglee

Replace hand-written API client with progenitor-generated code from
the official pyannote OpenAPI spec (https://docs.pyannote.ai/openapi.json).

- Add build.rs using progenitor-utils (same pattern as chatwoot crate)
- Add fetch.sh to download the OpenAPI spec
- Add openapi.gen.json (raw spec) and openapi.filtered.json (processed)
- Remove manual client code (lib.rs, get_job.rs, submit_diarization_job.rs, test_key.rs)
- Update dependencies: add progenitor-client, regress, chrono, serde_json; remove url, specta

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Feb 22, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit 1625ae6
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/699b13ff1b93580008fc2dad

@netlify
Copy link

netlify bot commented Feb 22, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit 1625ae6
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/699b13ffd66974000889cb9a

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@yujonglee yujonglee merged commit 811beb2 into main Feb 22, 2026
13 of 14 checks passed
@yujonglee yujonglee deleted the devin/1771770490-pyannote-cloud-progenitor branch February 22, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant